OpenStack Icehouse : Add Compute Nodes
2014/05/13 |
Add Compute Nodes to run more instances.
|
|
[1] |
Install KVM Hypervisor first
which needs on Compute Node. It's unnecessarry to set Bridge networking on the section [2] of the link.
|
[2] | Install Nova-Compute, Nova-Network |
root@node01:~# apt-get -y install nova-compute-kvm nova-api-metadata python-novaclient
|
[3] | Configure Nova |
root@node01:~#
vi /etc/nova/nova.conf # add at the last line # add if it's not need IPv6 use_ipv6=false auth_strategy=keystone rootwrap_config=/etc/nova/rootwrap.conf # the one added in MySQL connection=mysql://nova:password@10.0.0.30/nova osapi_compute_listen="0.0.0.0" osapi_compute_listen_port=8774 scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler # Glance server's hostname or IP glance_host=10.0.0.30 glance_port=9292 glance_protocol=http rpc_backend=nova.openstack.common.rpc.impl_kombu notification_driver=nova.openstack.common.notifier.rpc_notifier # Memcached server's hostname or IP memcached_servers=10.0.0.30:11211 # RabbitMQ server's hostname or IP rabbit_host=10.0.0.30 # RabbitMQ server's user for auth rabbit_userid=guest # RabbitMQ server's password of above user for auth rabbit_password=password # Keystone server's hostname or IP auth_host=10.0.0.30 auth_port=35357 auth_protocol=http admin_tenant_name=service admin_user=nova # Nova user's password added in Keystone admin_password=servicepassword |
[4] | Configure Networking. The follows is for the case you use legacy nova-network function. But if you use Neutron Networking function, Refer to here to configure it. Anyway, legacy nova-network function is officially not recommended. |
root@node01:~#
apt-get -y install nova-network
root@node01:~#
echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf root@node01:~# sysctl -p net.ipv4.ip_forward = 1
root@node01:~#
vi /etc/nova/nova.conf # add follows in [DEFAULT] section
network_driver=nova.network.linux_net
[keystone_authtoken]libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver linuxnet_interface_driver=nova.network.linux_net.LinuxBridgeInterfaceDriver firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver network_api_class=nova.network.api.API security_group_api=nova network_manager=nova.network.manager.FlatDHCPManager network_size=254 allow_same_net_traffic=False multi_host=True send_arp_for_ha=True share_dhcp_address=True force_dhcp_release=True # Nova API server's hostname or IP address metadata_host=10.0.0.30 # specify nic for public public_interface=eth0 # specify any name for bridge flat_network_bridge=br100 # specify nic for flat DHCP bridge flat_interface=lo |
[5] | Start Nova Service. If you don't use legacy nova-network, exclude the word "network" below. |
root@node01:~# for service in api-metadata compute network; do service nova-$service restart done nova-compute stop/waiting nova-compute start/running, process 2739 nova-network stop/waiting nova-network start/running, process 2754 nova-api-metadata stop/waiting nova-api-metadata start/running, process 2773 |